<?php 
class ListController extends CommonController{
	
	public function index(){
		$cid = Q('get.cid',0,'intval');
		$cidArr = K('Category')->getSon(K('Category')->all(),$cid);
		$cidArr[] = $cid;
		$data = array();
		foreach ($cidArr as $k => $v) {
			$data = array_merge($data,K('Goods')->where("cid={$v}")->all());
		}
		$this->assign("data",$data);
		$this->head();
	    $this->dis('list');
	}
}
